package com.mashiro.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mashiro.common.annotation.Excel;
import com.mashiro.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 材料管理对象 moe_material
 *
 * @author mashiro
 * @date 2023-04-18
 */
public class MoeMaterial extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 材料ID
     */
    private Long id;

    /**
     * 材料名称
     */
    @Excel(name = "材料名称")
    private String name;

    /**
     * 项目所属ID
     */
    @Excel(name = "项目所属ID")
    private Long projectId;

    /**
     * 项目所属
     */
    @Excel(name = "项目所属")
    private String projectName;

    /**
     * 任务所属ID
     */
    @Excel(name = "任务所属ID")
    private Long taskId;

    /**
     * 任务所属
     */
    @Excel(name = "任务所属")
    private String taskName;

    /**
     * 材料类型
     */
    @Excel(name = "材料类型")
    private Long type;

    /**
     * 材料数量
     */
    @Excel(name = "材料数量")
    private Long number;

    /**
     * 单价
     */
    @Excel(name = "单价")
    private Long unitPrice;

    /**
     * 实际费用
     */
    @Excel(name = "实际费用")
    private Long cost;

    /**
     * 采购单位
     */
    @Excel(name = "采购单位")
    private String procurement;

    /**
     * 采购时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "采购时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date buyTime;

    /**
     * 已使用数
     */
    @Excel(name = "已使用数")
    private Long used;

    /**
     * 状态
     */
    @Excel(name = "状态")
    private String status;

    /**
     * 删除标志（0存在 2删除）
     */
    private String delFlag;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getProjectId() {
        return projectId;
    }

    public void setProjectId(Long projectId) {
        this.projectId = projectId;
    }

    public Long getTaskId() {
        return taskId;
    }

    public void setTaskId(Long taskId) {
        this.taskId = taskId;
    }

    public Long getType() {
        return type;
    }

    public void setType(Long type) {
        this.type = type;
    }

    public Long getNumber() {
        return number;
    }

    public void setNumber(Long number) {
        this.number = number;
    }

    public Long getUnitPrice() {
        return unitPrice;
    }

    public void setUnitPrice(Long unitPrice) {
        this.unitPrice = unitPrice;
    }

    public Long getCost() {
        return cost;
    }

    public void setCost(Long cost) {
        this.cost = cost;
    }

    public String getProcurement() {
        return procurement;
    }

    public void setProcurement(String procurement) {
        this.procurement = procurement;
    }

    public Date getBuyTime() {
        return buyTime;
    }

    public void setBuyTime(Date buyTime) {
        this.buyTime = buyTime;
    }

    public Long getUsed() {
        return used;
    }

    public void setUsed(Long used) {
        this.used = used;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("name", getName())
                .append("projectId", getProjectId())
                .append("projectName", getProjectName())
                .append("taskId", getTaskId())
                .append("taskName", getTaskName())
                .append("type", getType())
                .append("number", getNumber())
                .append("unitPrice", getUnitPrice())
                .append("cost", getCost())
                .append("procurement", getProcurement())
                .append("buyTime", getBuyTime())
                .append("used", getUsed())
                .append("status", getStatus())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
